const BuiduAip = () => import('@/views/baidu/aip');
const Project = () => import('@/views/project/project');
const FaceSwitch = () => import('@/views/face/switch');
const Area = () => import('@/views/areas/area');
const Address = () => import('@/views/address/index');
const AddressList = () => import('@/views/address/address');
const Firmware = () => import('@/views/firmware/firmware');
const DeviceOperation = () => import('@/views/device/operation');
const FaceOperation = () => import('@/views/face/manage/operation');
const Version = () => import('@/views/firmware/version');
const Room = () => import('@/views/address/room');
const ServiceDetail = () => import('@/views/address/serviceDetail');


const dynamicRouter = [{
		showOperation: true,
		path: '/baiduaip',
		name: 'baiduaip',
		// component: () => import('@/views/baiduAip/baiduAip'),
		component: BuiduAip,
		meta: {
			title: '百度接口',
			icon: 'el-icon-connection',
			add: 'baiduaipAdd',
			del: 'baiduaipDel',
			edit: 'baiduaipEdit',
			view: 'baiduaipGet',
		}
	},
	{
		showOperation: true,
		path: '/project',
		name: 'project',
		// component: () => import('@/views/project/project'),
		component: Project,
		meta: {
			title: '项目管理',
			icon: 'el-icon-folder',
			add: 'projectAdd',
			del: 'projectDel',
			edit: 'projectEdit',
			view: 'projectGet',
		}
	},
	{
		showOperation: true,
		path: '/faceSwitch',
		name: 'faceSwitch',
		// component: () => import('@/views/project/project'),
		component: FaceSwitch,
		meta: {
			title: '人脸开关',
			icon: 'el-icon-switch-button',
			add: 'faceSwitchAdd',
			del: 'faceSwitchDel',
			edit: 'faceSwitchEdit',
			view: 'faceSwitchGet',
		}
	}, {
		showOperation: true,
		path: '/areas',
		name: 'areas',
		// component: () => import('@/views/baiduAip/baiduAip'),
		component: Area,
		meta: {
			title: '地区管理',
			icon: 'el-icon-location-information',
			add: 'areasAdd',
			del: 'areasDel',
			edit: 'areasEdit',
			view: 'areasGet',
		}
	},
	{
		showOperation: false,
		path: '/address',
		name: 'address',
		// component: () => import('@/views/project/project'),
		component: Address,
		meta: {
			title: '地址管理',
			icon: 'el-icon-map-location',
		},
		children: [{
			showOperation: true,
			path: '/address-list',
			name: 'addressList',
			component: AddressList,
			meta: {
				title: '地址列表',
				icon: 'el-icon-map-location',
				add: 'addressAdd',
				del: 'addressDel',
				edit: 'addressEdit',
				view: 'addressGet',
				operation1: 'roomManage',
				operation2: 'infoDetail'
			},
		}, {
			showOperation: true,
			path: '/room',
			name: 'room',
			// component: () => import('@/views/project/project'),
			component: Room,
			meta: {
				title: '房间管理',
				icon: 'el-icon-folder',
				add: 'roomAdd',
				del: 'roomDel',
				view: 'roomGet',
			}
		}, {
			showOperation: true,
			path: '/service-detail',
			name: 'serviceDetail',
			// component: () => import('@/views/project/project'),
			component: ServiceDetail,
			meta: {
				title: '地址信息服务详情',
				icon: 'el-icon-folder',
				view: 'serviceDetailGet',
				operation1: 'pushAddress',
			}
		}, {
			showOperation: true,
			path: '/maintenance',
			name: 'maintenance',
			component: () => import('@/views/address/maintenance'),
			meta: {
				title: '维护人员',
				icon: 'el-icon-folder',
				add: 'maintenanceAdd',
				del: 'maintenanceDel',
				view: 'maintenanceGet',
			}
		}]
	},
	{
		showOperation: false,
		path: '/packageManage',
		name: 'packageManage',
		component: () => import('@/views/firmware/index'),
		meta: {
			title: '固件管理',
			icon: 'el-icon-video-camera'
		},
		children: [{
			showOperation: true,
			path: '/package',
			name: 'package',
			component: Firmware,
			meta: {
				title: '固件列表',
				icon: 'el-icon-files',
				add: 'apkAdd',
				del: 'apkDel',
				edit: 'apkEdit',
				view: 'apkGet',
				operation1: 'apkVersion',
			}
		}, {
			showOperation: true,
			path: '/version',
			name: 'version',
			// component: () => import('@/views/project/project'),
			component: Version,
			meta: {
				title: '固件版本',
				icon: 'el-icon-folder',
				add: 'apkVersionAdd',
				del: 'apkVersionDel',
				view: 'apkVersionGet',
				operation1: 'apkVersionSend',
			}
		}]
	},
	{
		showOperation: false,
		path: '/device',
		name: 'device',
		component: () => import('@/views/device/index'),
		meta: {
			title: '设备管理',
			icon: 'el-icon-video-camera'
		},
		children: [{
			showOperation: true,
			path: '/device-list',
			name: 'deviceList',
			component: () => import('@/views/device/device'),
			meta: {
				title: '设备列表',
				add: 'deviceAdd',
				del: 'deviceDel',
				edit: 'deviceEdit',
				view: 'deviceGet',
				operation1: 'inOutLog',
				operation2: 'deviceMoreOperation',
			},
		}, {
			showOperation: true,
			path: '/command',
			name: 'command',
			component: () => import('@/views/device/command'),
			meta: {
				title: '指令列表',
				view: 'commandGet',
			},
		}, {
			showOperation: false,
			path: '/device-operation',
			name: 'deviceOperation',
			// component: () => import('@/views/project/project'),
			component: DeviceOperation,
			meta: {
				title: '设备操作',
			}
		}]
	},
	{
		showOperation: false,
		path: '/face',
		name: 'face',
		component: () => import('@/views/face/manage/index'),
		meta: {
			title: '人脸管理',
			icon: 'el-icon-video-camera'
		},
		children: [{
			showOperation: true,
			path: '/face-list',
			name: 'faceList',
			component: () => import('@/views/face/manage/face-list'),
			meta: {
				title: '人脸列表',
				add: 'faceAdd',
				del: 'faceDel',
				edit: 'faceEdit',
				view: 'faceGet',
				operation1: 'faceMoreOperation'
			},
		}, {
			showOperation: true,
			path: '/outInLogs',
			name: 'outInLogs',
			component: () => import('@/views/face/manage/face-logs'),
			meta: {
				title: '进出记录',
				view: 'outInLogsGet',
			},
		}, {
			showOperation: true,
			path: '/push-logs',
			name: 'pushLogs',
			component: () => import('@/views/face/manage/push-logs'),
			meta: {
				title: '推送记录',
				view: 'pushLogsGet',
			},
		}, {
			showOperation: true,
			path: '/danger',
			name: 'danger',
			component: () => import('@/views/face/manage/danger'),
			meta: {
				title: '可疑人脸',
				view: 'dangerGet',
				operation1: 'pushFace'
			},
		}, {
			path: '/face-operation',
			name: 'faceOperation',
			// component: () => import('@/views/project/project'),
			component: FaceOperation,
			meta: {
				title: '人脸操作',
				icon: 'el-icon-folder',
			}
		}]
	},
	{
		showOperation: false,
		path: '/permission',
		name: 'permission',
		component: () => import('@/views/account/index'),
		meta: {
			title: '权限管理',
			icon: 'el-icon-s-custom'
		},
		children: [{
			showOperation: true,
			path: '/manage',
			name: 'manage',
			component: () => import('@/views/account/manage'),
			meta: {
				title: '账号管理',
				add: 'manageAdd',
				del: 'manageDel',
				edit: 'manageEdit',
				view: 'manageGet',
				operation1: "manageResetPwd", // 重置密码
			},
		}, {
			showOperation: true,
			path: '/roles',
			name: 'roles',
			component: () => import('@/views/account/roles'),
			meta: {
				title: '角色管理',
				add: 'roleAdd',
				del: 'roleDel',
				edit: 'roleEdit',
				view: 'roleGet',
			}
		}]
	},
	{
		showOperation: false,
		path: '/policeInterface',
		name: 'policeInterface',
		component: () => import('@/views/policeInterface/index'),
		meta: {
			title: '公安接口上传管理',
			icon: 'el-icon-s-custom'
		},
		children: [{
				showOperation: true,
				path: '/information',
				name: 'information',
				component: () => import('@/views/policeInterface/uploadManage'),
				meta: {
					title: '接口上传',
					view: 'informationGet',
					operation1: "againPush",
				},
			}, {
				showOperation: true,
				path: '/policeInterfaceStatistical',
				name: 'policeInterfaceStatistical',
				component: () => import('@/views/policeInterface/statistical'),
				meta: {
					title: '接口上传统计',
				}
			}

		]
	},
	{
		showOperation: false,
		path: '/screen',
		name: 'screen',
		component: () => import('@/views/screen/index'),
		meta: {
			title: '屏保管理',
			icon: 'el-icon-s-custom'
		},
		children: [{
			showOperation: true,
			path: '/screen-list',
			name: 'screenSaver',
			component: () => import('@/views/screen/screen-list'),
			meta: {
				title: '屏保列表',
				add: 'screenSaverAdd',
				del: 'screenSaverDel',
				edit: 'screenSaverEdit',
				view: 'screenSaverGet',
			},
		}, {
			showOperation: true,
			path: '/push-screen',
			name: 'pushScreen',
			component: () => import('@/views/screen/push-screen'),
			meta: {
				title: '屏保推送记录',
			}
		}]
	}, {
		showOperation: false,
		path: '/other',
		name: 'other',
		component: () => import('@/views/other/other'),
		meta: {
			title: '其他操作（勿动）',
			icon: 'el-icon-s-custom'
		},

	},
]


export default dynamicRouter
